package com.epam.lissina.entity;

import java.util.ArrayList;

public class TravelAgency {

	private int companyId;
	private String companyName;
	private ArrayList<Tour> tours;

	public TravelAgency(int companyId, String companyName) {
		this.companyId = companyId;
		this.companyName = companyName;
		this.tours = new ArrayList<Tour>();
	}

	public int getCompanyId() {
		return companyId;
	}

	public void setCompanyId(int companyId) {
		this.companyId = companyId;
	}

	public String getCompanyName() {
		return companyName;
	}

	public void setCompanyName(String companyName) {
		this.companyName = companyName;
	}

	public ArrayList<Tour> getTours() {
		//ArrayList<Tour> listOfTours = new ArrayList<Tour>();
		//listOfTours.addAll(this.tours);
		return new ArrayList<Tour>(this.tours);
	}

	public void setTours(ArrayList<Tour> tours) {
		this.tours = tours;
	}

	public void addTour(Tour newTour) {
		this.tours.add(newTour);
	}
}